1. Field of the Invention
This invention relates to data storage in general and, more particularly, to a method and apparatus for data moving in multi-device file systems.
2. Description of the Related Art
Modern business operations frequently rely upon continual access to large amount of data and the need for data storage capacity in enterprise systems is growing exponentially with no end in sight. Another primary concern of large enterprises is having their data available continuously. A file system may be defined as a collection of files and file system metadata (e.g., directories and inodes) that, when set into a logical hierarchy, make up an organized, structured set of information. File systems may be mounted from a local system or remote system. File system software often includes the system or application-level software that may be used to create, manage, and access file systems. In the past, file systems were typically implemented with either a single volume namespace, or with no volume namespace at all (e.g. directly on a single LUN), and thus all files in the file system have the same storage characteristics (e.g. type of storage device, reliability characteristics, etc.). Different storage devices and therefore volumes may have different performance characteristics, costs, and/or reliability characteristics. However, some files may be considered “more important” than others, and thus higher reliability characteristics may be desired for these files (even at the expense of lower performance characteristics). Other files may be frequently accessed and updated, and thus high performance characteristics may be desired (even at the expense of lower reliability characteristics). Additionally, files may have both data (the information stored in the file) and metadata (information about the data).
File system metadata may be defined as information that file system software maintains on files stored in the file system. File system metadata may include, but is not limited to, definitions and descriptions of the data it references. File system metadata may include one or more of, but is not limited to, inodes, directories, mapping information in the form of indirect blocks, superblocks, etc. Generally, file system metadata for a file includes path information for the file as seen from the application side and corresponding file system location information (e.g. device:block number(s)). File system metadata may itself be stored on a logical or physical device within a file system. For some applications, metadata is often considered as important as data, and thus high reliability characteristics may be desired. File systems also frequently log data to a transaction journal before storing the data as part of the full file system data storage. Generally systems use logging or journaling as a measure to ensure that the data can be recovered in the event of a system crash or other failure. When logging, the system may keep a copy of the in-flight data in memory so it can write it to its final destination on a storage device, such as a hard drive. Both data that needs to go to its final destination within a file, as well as metadata (or structures which describes how the file system is used or declare attributes of the data within the file system) are frequently written to a transaction log.
Traditionally, if a file system wants to change the location of data stored on a multi-device file system, a host process of the file system would need to move the data by reading the data from one device and writing the data to another device. For example, as illustrated by FIG. 1, a file system software executing on a host device, such as file system host 10, will generally read the data from its location on a storage device, such as a hard drive or storage device 30, into the host 10's system memory before writing the data out to the data's new location on destination device 40. A file system host, such as host 10, may communicate directly with the source and destination storage devices, or may communicate via another device in the storage network, such as a switch or other device that provides pass through access to storage devices, as illustrated by pass-through data access device 20 in FIG. 1. Generally, the host performing such a move would have fewer resources available during the move for other processes or tasks. Similarly, when a logging file system needs to move data from a transaction log to another storage location host software must first read the data from the log into memory and then write the data out to the data's new location on the storage device.